import pandas as pd

def compute_dau(df):
    df['date'] = df['timestamp'].dt.date
    dau = df.groupby('date')['visitorid'].nunique()
    return dau

def compute_wau(df):
    df['week'] = df['timestamp'].dt.to_period('W').apply(lambda r: r.start_time)
    wau = df.groupby('week')['visitorid'].nunique()
    return wau

def compute_mau(df):
    df['month'] = df['timestamp'].dt.to_period('M').apply(lambda r: r.start_time)
    mau = df.groupby('month')['visitorid'].nunique()
    return mau
